<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>位移转换</title>
    <style>
        div {
            width: 100px;
            height: 100px;
            background-color: pink;
        }

        div:hover {
            /* width: 200px;
            height: 200px; */

            /* 
                translate如果只写一个值,那就是只控制水平方向位移
            */
            transform: translate(100px, 200px);
            transition: all 2s;
        }
    </style>
</head>

<body>
    <div></div>
</body>

</html>